//
//  BCUILabel.swift
//  NewXueBa
//
//  Created by Shine on 2019/6/4.
//  Copyright © 2019 jmxQAQ. All rights reserved.
//

import Foundation
import UIKit

@IBDesignable // 申明这个类在XCode直接看到渲染的效果

class BCUILabel: UILabel {
    // 半径
    @IBInspectable var bcCornerRadius: CGFloat = 0
    
    @IBInspectable var bcBorderWidth: CGFloat = 0
    
    @IBInspectable var bcBorderColor: UIColor = UIColor.clear
    
    override func draw(_ rect: CGRect) {
        super.draw(rect)
        self.layer.cornerRadius = bcCornerRadius
        self.layer.masksToBounds = true
        self.layer.borderWidth = bcBorderWidth
        self.layer.borderColor = bcBorderColor.cgColor
    }
    
}
